﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LevelEditor
{
    public partial class NewLevel : Form
    {
        private LevelEditor lEditor;
        public NewLevel(LevelEditor lEditor)
        {
            this.lEditor = lEditor;
            InitializeComponent();
        }

        private void NewLevel_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            lEditor.xmlHandler.newLevel = true;
            lEditor.objectsOnScreen = new List<CustomObject>();
            lEditor.pictureBox1.Invalidate();
            lEditor.currentLevel = (int)Convert.ToDouble(levelBox.Text);
            lEditor.currentLVL.Text += levelBox.Text + "";
            lEditor.amountofPlayersOnMapText.Text = "Amount of players in this level" + amountofPlayersBox.Text;
            lEditor.xmlHandler.amountofPlayersOnMap = amountofPlayersBox.Text;
        }
    }
}
